package com.jn.exam.question.mapper;

import com.jn.exam.question.entity.Paper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jn.exam.question.entity.vo.PaperInfo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 江南大学1033190417
 * @since 2022-02-06
 */
public interface PaperMapper extends BaseMapper<Paper> {

    boolean createNewPaper(Paper paper);

    boolean insertPaperTeacherConnection(String teacherId, String paperId,String permission);

    List<PaperInfo> getRelatedPaper(String teacherId);

    boolean removePaperTeacherConnection(String paperId);

    boolean inviteOneTeacherForPaper(Map<String, Object> param);

    boolean updatePaperPermissionForTeacher(Map<String, Object> param);

    List<Map<String, Object>> ifHasTeacherPaperConnection(Map<String, Object> param);

    boolean deleteTeacherFromPaper(Map<String, Object> param);

    List<PaperInfo> getAllStatusPaperInfo(String status);

    boolean savePaper(Paper paper);

    Float getTotalScoreOfPaper(String paperId);
}
